<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.3/css/bootstrap.css">
  <title>
    <%= htmlWebpackPlugin.options.title %>
  </title>
  <style>
    /* html { */
    /* 750设计稿中: 1rem=100px */
    /* font-size: 100px; */
    /* } */

    /* html,
    body {
      margin: 0;
      padding: 0;
      height: 100%;
      background-color: #F4F4F4;
    } */

    /* #app {
      margin: 0 auto;
      max-width: 750px;
      min-height: 100%;
      background-color: #fff;
    } */
  </style>
  <script>
    // 自执行函数
    // ~ function () {
    //   function computed() {
    //     var HTML = document.documentElement,
    //       winW = HTML.clientWidth,
    //       desW = 750;
    //     if (winW >= desW) {
    //       HTML.style.fontSize = "100px";
    //       return;
    //     }
    //     HTML.style.fontSize = winW / desW * 100 + "px";
    //   }
    //   computed(); window.addEventListener("resize", computed);
    // }()
  </script>
</head>

<body>
  <noscript>
    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
        Please enable it to continue.</strong>
  </noscript>
  <div id="app">
    loading...
  </div>
  <!-- built files will be auto injected -->
</body>
<!-- 智能显示隐藏导航栏:
  http://www.ilxtx.com/auto-hide-navbar.html
  https://boke112.com/post/3476.html
 -->
<script type="text/javascript" src="https://npmcdn.com/headroom.js@0.9.3/dist/headroom.min.js"></script>
<script>
  ~ function () {
    new Headroom(document.querySelector("#nav-headroom-scroll"), { //这里的nav-scroll改为你的导航栏的id或class
      // 在元素没有固定之前，垂直方向的偏移量（以px为单位）-- 往下滚205px才会触发
      offset: 205,
      // scroll tolerance in px before state changes        
      tolerance: 5,
      classes: {
        // 当元素初始化后所设置的class
        initial: "headroom-animated",
        // 向上滚动时设置的class ["slideDown", "swingInX", "flipInX", "bounceInDown"]
        pinned: "slideDown",
        // 向下滚动时所设置的class ["slideUp", "swingOutX", "flipOutX", "bounceOutUp"]
        unpinned: "slideUp"
      }
    }).init();
    // to destroy
    // headroom.destroy();
  }();
</script>

</html>
